import {join} from 'path'
import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import pkg from '../package.json'
import vueJsx from '@vitejs/plugin-vue-jsx'

// https://vitejs.dev/config/
export default defineConfig({
    mode: process.env.NODE_ENV,
    root: join(__dirname, '../src/renderer'),
    plugins: [
        vue(),
        vueJsx(),
       ],
    base: './',
    build: {
        emptyOutDir: true,
        outDir: '../../dist/renderer',
    },
    server: {
        host: pkg.env.HOST,
        port: pkg.env.PORT,
    },
})
